package com.reder.practice.common.enums.state;

import com.reder.practice.common.enums.Statable;
import lombok.Getter;

/**
 * 通用响应枚举类
 *
 * @author Imp
 * email: 1318944013@qq.com
 * date: 2019/3/6 10:25
 */
@Getter
public enum VideoState implements Statable {

    SUCCESS(Statable.SUCCESS_CODE, "成功"),
    ADD_VIDEO_ERROR(-1, "新增视频失败"),
    DELETE_VIDEO_ERROR(-1, "删除视频失败"),
    UPLOAD_FILE_EMPTY(-1, "上传的文件为空"),
    UPLOAD_FILE_ERROR(-1, "上传文件失败"),
    UPDATE_PARAM_ERROR(-1, "更新视频参数不完整"),
    VODEO_NOT_EXIST(-1, "视频不存在"),
    UPDATE_VIDEO_ERROR(-1, "更新视频信息失败"),
    LIST_VIDEO_ERROR(-1, "查询视频列表失败"),
    USER_INFO_IS_NULL(-1, "用户信息为空");

    int code = Statable.SUCCESS_CODE;
    String msg = null;

    VideoState(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
